luci-app-acme: validation_method alpn and listen_port
authorSergey Ponomarev <[email protected]>
Sat, 4 Oct 2025 08:16:34 +0000 (11:16 +0300)
committerToke Høiland-Jørgensen <[email protected]>
Tue, 7 Oct 2025 12:01:06 +0000 (14:01 +0200)
Signed-off-by: Sergey Ponomarev <[email protected]>
applications/luci-app-acme/htdocs/luci-static/resources/view/acme/acme.js

index df23ae98418535856007c512ea77871de4ab47ee..9b165edade6e68511307c84f921fdfb66b624a00 100644 (file)
@@ -89,11 +89,14 @@ return view.extend({
                o = s.taboption('general', form.ListValue, 'validation_method', _('Validation method'),
                        _('Standalone mode will use the built-in webserver of acme.sh to issue a certificate. ' +
                                'Webroot mode will use an existing webserver to issue a certificate. ' +
-                               'DNS mode will allow you to use the DNS API of your DNS provider to issue a certificate.')
+                               'DNS mode will allow you to use the DNS API of your DNS provider to issue a certificate.') + '<br />' +
+                       _('Validation via TLS ALPN') + ': ' + _('Validate via TLS port 443.') + '<br />' +
+                       '<a href="https://letsencrypt.org/docs/challenge-types/" target="_blank">' + _('See more') + '</a>'
                );
                o.value('standalone', 'HTTP-01' + _('Standalone'));
                o.value('webroot', 'HTTP-01' + _('Webroot Challenge Validation'));
                o.value('dns', 'DNS-01 ' + _('DNS Challenge Validation'));
+               o.value('alpn', 'TLS-ALPN-01 ' + _('Validation via TLS ALPN'));
                o.default = 'standalone';
 
                if (!hasDnsApi) {
@@ -109,6 +112,20 @@ return view.extend({
                        };
                }
 
+               o = s.taboption('general', form.Value, 'listen_port', _('Listen port'),
+                       _('Port where to listen for ACME challenge requests. The port will be temporarily open during validation.') + '<br />' +
+                       _('It may be needed to change if your web server is behind reverse proxy and uses a different port.') + '<br />' +
+                       _('Standalone') + ': ' + _('Default') + ' 80.' + '<br />' +
+                       _('Webroot Challenge Validation') + ': ' + _('To temporary open port you can specify your web server port e.g. 80.') + '<br />' +
+                       _('Validation via TLS ALPN') + ': ' + _('Default') + ' 443.'
+               );
+               o.optional = true;
+               o.placeholder = '80';
+               o.depends('validation_method', 'standalone');
+               o.depends('validation_method', 'webroot');
+               o.depends('validation_method', 'alpn');
+               o.modalonly = true;
+
                o = s.taboption('general', form.DynamicList, "domains", _("Domain names"),
                        _("Domain names to include in the certificate. " +
                                "The first name will be the subject name, subsequent names will be alt names. " +